//
//  ___PROJECTNAMEASIDENTIFIER___AppDelegate.mm
//  ___PROJECTNAME___
//
//  Created by ___FULLUSERNAME___ on ___DATE___.
//  Copyright ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved.
//

#import "___PROJECTNAMEASIDENTIFIER___AppDelegate.h"
#import "GLViewController.h"

@implementation ___PROJECTNAMEASIDENTIFIER___AppDelegate

@synthesize window;
@synthesize viewCtrl;


#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
	
	UIWindow *win = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
	self.window = win;
	[win release];
	
	GLViewController *ctrl = [[GLViewController alloc] init];
	self.viewCtrl = ctrl;
	[ctrl release];
	
	[window addSubview:viewCtrl.view];
	[window makeKeyAndVisible];
	return YES;
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
	[viewCtrl startAnimation];
}

- (void)applicationWillResignActive:(UIApplication *)application {
	[viewCtrl stopAnimation];
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
	
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
	
}

- (void)applicationWillTerminate:(UIApplication *)application {
	[viewCtrl stopAnimation];
}


#pragma mark -
#pragma mark Memory management

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
	
}


- (void)dealloc {
	[viewCtrl release];
	[window release];
	[super dealloc];
}


@end
